package com.waves.user.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.waves.common.domain.dto.PageBaseDTO;
import com.waves.common.domain.vo.PageBaseVO;
import com.waves.core.web.domain.dto.CursorPageBaseDTO;
import com.waves.core.web.domain.vo.CursorPageBaseVO;
import com.waves.user.domain.dto.friend.FriendApplyDTO;
import com.waves.user.domain.dto.friend.FriendApproveDTO;
import com.waves.user.domain.dto.friend.FriendCheckDTO;
import com.waves.user.domain.vo.friend.FriendApplyVO;
import com.waves.user.domain.vo.friend.FriendCheckVO;
import com.waves.user.domain.vo.friend.FriendUnreadVO;
import com.waves.user.domain.vo.friend.FriendVO;
import org.springframework.stereotype.Service;

/**
 * @author : dlw
 * @description : 好友
 * @date : 2024/07/19
 */
@Service
public interface FriendService {

    /**
     * 检查
     * 检查是否是自己好友
     *
     * @param request 请求
     * @param uid     uid
     * @return {@link FriendCheckVO}
     */
    FriendCheckVO check(FriendCheckDTO request);

    /**
     * 应用
     * 申请好友
     *
     * @param request 请求
     * @param uid     uid
     */
    void apply( FriendApplyDTO request);

    /**
     * 分页查询好友申请
     *
     * @param request 请求
     * @return {@link PageBaseVO}<{@link FriendApplyVO}>
     */
    PageBaseVO<FriendApplyVO> pageApplyFriend(PageBaseDTO request);

    /**
     * 申请未读数
     *
     * @return {@link FriendUnreadVO}
     */
    FriendUnreadVO unread();

    /**
     * 同意好友申请
     *
     * @param uid     uid
     * @param request 请求
     */
    void applyApprove(Long uid, FriendApproveDTO request);

    /**
     * 删除好友
     *
     * @param uid       uid
     * @param friendUid 朋友uid
     */
    void deleteFriend(Long friendUid);

    CursorPageBaseVO<FriendVO> friendList(CursorPageBaseDTO request);
}
